﻿<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
    <h1 class="h3">用户</h1>
    <div class="btn-toolbar mb-2 mb-md-0">
        <!--<div class="btn-group mr-2">-->
        <div class="btn-group" role="group">
            <button type="button" class="btn btn-sm btn-outline-secondary" onclick="User.addUser()"><span data-feather="user-plus"></span> 新增</button>
        </div>
        <!--</div>-->
    </div>
</div>

<div class="mb-2 collapse" id="divAddUser">
    <form class="bv-form" id="frmAddUser">
        <div class="form-group">
            <label for="inputUserName">用户名</label>
            <input type="text" class="form-control" data-bv-field="inputUserName" name="inputUserName" id="inputUserName" placeholder="请输入用户名">
            <!--<small id="emailHelp" class="form-text text-muted">请输入1~65535之间的数字.</small>-->
        </div>
        <div class="form-group" id="divPassword">
            <label for="inputPassword">密码</label>
            <input type="password" data-bv-field="inputPassword" name="inputPassword" class="form-control" id="inputPassword" placeholder="请输入登录密码">
        </div>

        <div class="form-group">
            <label for="inputEmail">邮箱</label>
            <input type="text" class="form-control" data-bv-field="inputEmail" name="inputEmail" id="inputEmail" placeholder="请输入邮箱">
        </div>

        <div class="form-group">
            <div class="pretty p-switch p-fill">
                    <input type="checkbox"  id="cbReceiveEmail"/>
                    <div class="state"><label>接收邮件</label>
                    </div>
                </div>
        </div>

        <div class="form-group">
        <div class="pretty p-default p-round">
            <input type="radio" checked="checked" name="role" value="0">
            <div class="state"><label>普通用户</label></div>
        </div>
        <div class="pretty p-default p-round">
            <input type="radio" name="role" value="1">
            <div class="state"><label>管理员</label></div>
        </div>
        <div class="pretty p-default p-round">
            <input type="radio" name="role" value="2">
            <div class="state"><label>超级管理员</label>
            </div>
        </div>
    </div>

        <button type="button" id="btnAddUser" class="btn btn-primary mr-2">保存</button>
        <button type="button"  class="btn btn-outline-secondary" onclick='$("#divAddUser").collapse("hide");'>取消</button>
    </form>
</div>


<div class="table-responsive-md">

    <table class="table table-striped" style="min-width: 600px;">
        <thead>
            <tr>
                <th style="width:30px">#</th>
                <th>Id</th>
                <th>登录名</th>
                <th>创建时间</th>
                <th>角色</th>
                <th>邮箱</th>
                <th>接收邮件</th>
                <th style="width:260px">操作</th>

            </tr>
        </thead>
        <tbody id="user_tb_body"></tbody>
    </table>
</div>